home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI MIPSpro C Compiler 7.2
/
SGI MIPSpro C Compiler 7.2.iso
/
relnotes
/
c_fe
/
ch6.z
/
ch6
Wrap
Text File
|
1997-09-05
|
10KB
|
462 lines
- 1 -
7.2 ANSI C Front-End Release Notes
- 2 -
DDDDooooccccuuuummmmeeeennnntttt NNNNuuuummmmbbbbeeeerrrr 000000007777----1111666655559999----000011110000
6. _B_u_g__F_i_x_e_s
This chapter briefly describes the bugs that
have been fixed in the compiler since release
7.1. Some of the headings are followed by a
Silicon Graphics incident report number.
+o The following line of code was incorrectly
being compiled under -n32 with MIPSpro 7.1
return ( ! !((!(error) || (*(error) == (1)))) )
This has been fixed (Bug 449456)
+o Under certain circumstances the C compiler
would dump core with the following message:
Signal: Segmentation fault in Scope Setup phase.
Error: Signal Segmentation fault in phase Scope Setup -- processing
aborted
cc ERROR: /usr/lib32/cmplrs/fec died due to signal 4
cc ERROR: core dumped
This has been fixed (Bug 470114)
+o Incorrect code produced under optimization
(-O2 or higher).
The compiler incorrectly optimized the
following code: (A workaround was provided
under the #ifdef OPT_BUG)
for (args = result; num_args1 != 0; num_args1--)
*args++ = *args1++;
#ifdef OPT_BUG /* Workaround of compiler 7.1 bug */
while (num_args2-- > 0)
#else
for ( ; num_args2 != 0; num_args2--)
#endif
*args++ = *args2++;
return result
This bug has been fixed. (Bug #428276)
+o Incorrect optimization under -O3.
The following code would produce incorrect
- 3 -
results when compiled under -O3:
/* test1.c */
#include <stdio.h>
main()
{
char str[] = "1.2345";
char *cp = str;
char *cpe = NULL;
printf ("1. scp = %s, cp = %x0, cp, (unsigned int) cp);
while (cp != cpe)
{
if (*cp++ == '.') break;
}
printf ("2. scp = %s, cp = %x0, cp, (unsigned int) cp);
}
This has been fixed. (Bug #447872)
+o Incorrect optimization under -O3.
The following code would produce incorrect
results when compiled under -O3:
/* test1.c */
#include <stdio.h>
main()
{
char str[] = "1.2345";
char *cp = str;
char *cpe = NULL;
printf ("1. scp = %s, cp = %x0, cp, (unsigned int) cp);
while (cp != cpe)
{
if (*cp++ == '.') break;
}
printf ("2. scp = %s, cp = %x0, cp, (unsigned int) cp);
}
- 4 -
This has been fixed. (Bug #447872)
+o Improper handling of __return_address
The following code gets incorrectly
compiled -n32 because the reference to
__return_address causes the return address
from buggy to be retrieved with incorrect
sign extension.
void buggy() { bar(__return_address); }
This has been fixed. (Bug #460589)
+o INTERNAL ERROR when compiling C code with
#pragma numthreads.
The following example illustrates an
INTERNAL ERROR in /usr/lib32/cmplrs/be:
- 5 -
%cc -mp -O3 -xansi -64 -mips4 -TENV:X=1 -OPT:alias=restrict -c file.c
### Compiler Error in file irvcc2.c during MP Lowering phase:
### out of context pragma (NUMTHREADS) in MP processing
cc INTERNAL ERROR: /usr/lib32/cmplrs/be returned non-zero status 1
%cat file.c
void
fored (int *rmatbeg, int *rmatind, double *rmatval, int *rmatend,
int rows, int cols, double *y, double *x, int maxthreads)
{
int i, j, j1, k, l;
double temp;
if ( mpc_in_parallel_region() ) maxthreads = 1;
#pragma parallel
#pragma numthreads (min=1;max=maxthreads)
#pragma shared (rmatbeg, rmatend, rmatind, rmatval, y, x, rows)
#pragma local (i, k, l, temp)
{
#pragma pfor iterate(i=0;rows;1) schedtype(gss)
for (i = 0; i < rows; i++) {
temp = 0.0;
l = rmatend[i];
#pragma ivdep
for (k = rmatbeg[i]; k < l; k++) {
temp += rmatval[k]*x[rmatind[k]];
}
y[i] = temp;
} /* End for loop */
} /* End parallel section */
}
This has been fixed. (Bug #461670)
+o Incorrect promotion of formal arguments.
The following code would produce incorrect
results when compiled -64.
- 6 -
#include <stdio.h>
int R_DIEDRE(xa,ya,za,xb,yb,zb,xc,yc,zc,xd,yd,zd)
float xa,ya,za;/* coord. du 1er atome */
float xb,yb,zb;/* coord. du 2eme atome */
float xc,yc,zc;/* coord. du 3eme atome */
float xd,yd,zd;/* coord. du 4eme atome */
{
printf("%f %f %f %f %f %f %f %f %f %f %f
%f0,xa,ya,za,xb,yb,zb,xc,yc,zc,xd,yd,zd);
return(0);
}
main()
{
float X[40],Y[40],Z[40],ang;
R_DIEDRE(123.4,123.4,123.4,
123.4,123.4,123.4,
123.4,123.4,123.4,
123.4,123.4,123.4);
}
This has been fixed (Bug #465609).
+o Incorrect sign extension induced by
optimizer
Under certain circumstances the optimizer
would produce code with values incorrectly
sign extended. This has been fixed (Bugs
#467930 and #468670).
+o Assertion failure in compiler back-end.
The following code would cause the
compilation to fail for -n32 compiles:
- 7 -
typedef struct bar {
unsigned long size;
unsigned long space;
} bar;
typedef struct foo {
bar dict;
} foo;
#define size(d) ((d)->size-(d)->space)
void spam (foo *baz)
{
int flag = 1;
flag &= (size(&baz->dict) <= 4294967295U);
}
This has been fixed (Bug #469411).
+o cc generates bad code when assigning to a
variable in expression
Under certain circumstances cc would
generate bad code when assigning to a
variable in an expression. This has been
fixed (Bug 462177).